package vn.easyticket.db;

import vn.easyticket.db.entity.M001_UserProfile;
import vn.easyticket.db.exceptions.NoServiceFoundException;
import vn.easyticket.db.facet.M001_UserProfileRepositoryService;

public class TestAnno
{
    public static void main( String[] args )
    {
        try
        {
            RepositoriesServiceFactory svf = RepositoriesServiceFactoryImpl.getInstance();
            M001_UserProfileRepositoryService repo = svf.getService( M001_UserProfileRepositoryService.class );
            M001_UserProfile user1 = repo.findByUserName( "sa" );
            M001_UserProfile user2 = repo.findOne( 1001 );
            System.out.println( user1.getUserId() );
            System.out.println( user2.getUserName() );
        }
        catch ( NoServiceFoundException e )
        {
        }

        System.out.println( "null" );
    }
}
